#ifndef SCENEITEM_H
#define SCENEITEM_H

#include <QWidget>
#include "sceneproject.h"
#include <QPainter>
namespace Ui {
class SceneItem;
}

class ProjectItem : public QWidget
{
    Q_OBJECT

public:
    QString strID;
    explicit ProjectItem(QString id, QWidget *parent = nullptr);
    ~ProjectItem();

    SceneProject *getScene();
signals:
    void clickThis(QString id);
    void deleteThis(QString id);

protected:
    void paintEvent(QPaintEvent *);
    void mousePressEvent(QMouseEvent *event);
    void focusInEvent(QFocusEvent *e);
    void focusOutEvent(QFocusEvent *e);
    void resizeEvent(QResizeEvent *event);

private:
    Ui::SceneItem *ui;
    SceneProject *sceneWidget;
    bool isFocus = 0;
    void showMenu(const QPoint &pos);
};

#endif // SCENEITEM_H
